package com.yuwj.chinaa.presenter.presenterImpl;

import android.app.Activity;
import android.app.Dialog;
import android.support.v4.app.Fragment;

import com.yuwj.chinaa.activity.IActivity;
import com.yuwj.chinaa.callback.ModelCallback;
import com.yuwj.chinaa.entity.EntityAppInfo;
import com.yuwj.chinaa.entity.EntityAssetDetailRecord;
import com.yuwj.chinaa.entity.EntityAssetGTEDetail;
import com.yuwj.chinaa.entity.EntityAssetGTEOverview;
import com.yuwj.chinaa.entity.EntityAssetGTKDetail;
import com.yuwj.chinaa.entity.EntityAssetGTKOverview;
import com.yuwj.chinaa.entity.EntityAssetsBag;
import com.yuwj.chinaa.entity.EntityBurseCoinNumber;
import com.yuwj.chinaa.entity.EntityBurseRecord;
import com.yuwj.chinaa.entity.EntityBurseRecordDetail;
import com.yuwj.chinaa.entity.EntityCommunity;
import com.yuwj.chinaa.entity.EntityCommunityLevelMember;
import com.yuwj.chinaa.entity.EntityComputeCodeEarningRecord;
import com.yuwj.chinaa.entity.EntityExercise;
import com.yuwj.chinaa.entity.EntityGeneralAuth;
import com.yuwj.chinaa.entity.EntityMyCommunity;
import com.yuwj.chinaa.entity.EntityMyComputeCode;
import com.yuwj.chinaa.entity.EntityNews;
import com.yuwj.chinaa.entity.EntityNotice;
import com.yuwj.chinaa.entity.EntityOrder;
import com.yuwj.chinaa.entity.EntityOrderDetail;
import com.yuwj.chinaa.entity.EntityOrderWithTrade;
import com.yuwj.chinaa.entity.EntityOtherAssets;
import com.yuwj.chinaa.entity.EntityPartnerApply;
import com.yuwj.chinaa.entity.EntityReceivingAddress;
import com.yuwj.chinaa.entity.EntityTradeOrderDeatil;
import com.yuwj.chinaa.entity.EntityTradePriceData;
import com.yuwj.chinaa.entity.EntityUser;
import com.yuwj.chinaa.model.IModel;
import com.yuwj.chinaa.model.ModelImpl.ModelImpl;
import com.yuwj.chinaa.presenter.IPresenter;

import java.io.File;
import java.util.List;

/**
 * MVP模式的P层,控制层实现类
 */

public class PresenterImpl implements IPresenter {
    private IActivity view;
    private IModel model;

    /**
     * 用于请求之后的回调,在activity和fragment中用到.
     *
     * @param view
     */
    public PresenterImpl(IActivity view) {
        this.view = view;
        if (view instanceof Activity) {
            model = new ModelImpl(view);
        } else if (view instanceof Fragment) {
            model = new ModelImpl(((Fragment) view).getActivity());
        }

    }

    @Override
    public void xxxxxxxxxxxxxx应用相关开始xxxxxxxxxxxxxx() {

    }

    @Override
    public void appInfo(String jsonParam) {
        model.appInfo(jsonParam, new ModelCallback() {

            @Override
            public void onAppInfoSuccess(EntityAppInfo entityAppInfo) {
                super.onAppInfoSuccess(entityAppInfo);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onAppInfoSuccess(entityAppInfo);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onAppInfoSuccess(entityAppInfo);
                }
            }

            @Override
            public void onAppInfoFail(Exception e) {
                super.onAppInfoFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onAppInfoFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onAppInfoFail(e);
                }
            }
        });
    }

    @Override
    public void appFeedback(String jsonParam) {
        model.appFeedback(jsonParam, new ModelCallback() {

            @Override
            public void onAppFeedbackSuccess(String info) {
                super.onAppFeedbackSuccess(info);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onAppFeedbackSuccess(info);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onAppFeedbackSuccess(info);
                }
            }

            @Override
            public void onAppFeedbackFail(Exception e) {
                super.onAppFeedbackFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onAppFeedbackFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onAppFeedbackFail(e);
                }
            }
        });
    }

    @Override
    public void appUploadFilesImage(String jsonParam, String uploadImg) {
        model.appUploadFilesImage(jsonParam, uploadImg, new ModelCallback() {

            @Override
            public void appUploadFilesImageSuccess(String imgUrl) {
                super.appUploadFilesImageSuccess(imgUrl);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.appUploadFilesImageSuccess(imgUrl);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.appUploadFilesImageSuccess(imgUrl);

                }
            }

            @Override
            public void appUploadFilesImageFail(Exception e) {
                super.appUploadFilesImageFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.appUploadFilesImageFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.appUploadFilesImageFail(e);
                }
            }
        });
    }

    @Override
    public void downloadFile(Dialog dialog, String fileUrl, String fileForder, String fileName) {
        model.downloadFile(dialog, fileUrl, fileForder, fileName, new ModelCallback() {
            @Override
            public void onDownloadFileSuccess(File file) {
                super.onDownloadFileSuccess(file);
                if (file.exists() && view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onDownloadFileSuccess(file);
                } else if (file.exists() && view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onDownloadFileSuccess(file);
                }
            }

            @Override
            public void onDownloadFileFail(Throwable throwable) {
                super.onDownloadFileFail(throwable);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onDownloadFileFail(throwable);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onDownloadFileFail(throwable);
                }
            }
        });
    }


    @Override
    public void xxxxxxxxxxxxxx应用相关结束xxxxxxxxxxxxxx() {

    }

    @Override
    public void xxxxxxxxxxxxxx账户相关开始xxxxxxxxxxxxxx() {

    }

    @Override
    public void userLogin(String jsonParam) {
        model.userLogin(jsonParam, new ModelCallback() {
            @Override
            public void onUserLoginSuccess(EntityUser entityUser) {
                super.onUserLoginSuccess(entityUser);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onUserLoginSuccess(entityUser);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onUserLoginSuccess(entityUser);
                }
            }

            @Override
            public void onUserLoginFail(Exception e) {
                super.onUserLoginFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onUserLoginFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onUserLoginFail(e);
                }
            }
        });
    }

    @Override
    public void userLogout(String jsonParam) {
        model.userLogout(jsonParam, new ModelCallback() {
            @Override
            public void onUserLogoutSuccess() {
                super.onUserLogoutSuccess();
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onUserLogoutSuccess();
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onUserLogoutSuccess();
                }
            }

            @Override
            public void onUserLogoutFail(Exception e) {
                super.onUserLogoutFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onUserLogoutFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onUserLogoutFail(e);
                }
            }
        });
    }

    @Override
    public void msgGetVerifyCode(String jsonParam) {
        model.msgGetVerifyCode(jsonParam, new ModelCallback() {

            @Override
            public void onMsgGetVerifyCodeSuccess(String code) {
                super.onMsgGetVerifyCodeSuccess(code);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onMsgGetVerifyCodeSuccess(code);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onMsgGetVerifyCodeSuccess(code);
                }
            }


            @Override
            public void onMsgGetVerifyCodeFail(Exception e) {
                super.onMsgGetVerifyCodeFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onMsgGetVerifyCodeFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onMsgGetVerifyCodeFail(e);
                }
            }
        });
    }

    @Override
    public void userRegister(String jsonParam) {
        model.userRegister(jsonParam, new ModelCallback() {

            @Override
            public void onUserRegisterSuccess() {
                super.onUserRegisterSuccess();
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onUserRegisterSuccess();
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onUserRegisterSuccess();
                }
            }


            @Override
            public void onUserRegisterFail(Exception e) {
                super.onUserRegisterFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onUserRegisterFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onUserRegisterFail(e);
                }
            }
        });
    }

    @Override
    public void userResetPassword(String jsonParam) {
        model.userResetPassword(jsonParam, new ModelCallback() {

            @Override
            public void onUserResetPasswordSuccess(String pwd) {
                super.onUserResetPasswordSuccess(pwd);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onUserResetPasswordSuccess(pwd);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onUserResetPasswordSuccess(pwd);
                }
            }


            @Override
            public void onUserResetPasswordFail(Exception e) {
                super.onUserResetPasswordFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onUserResetPasswordFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onUserResetPasswordFail(e);
                }
            }
        });
    }

    @Override
    public void userForgetPassword(String jsonParam) {
        model.userForgetPassword(jsonParam, new ModelCallback() {

            @Override
            public void onUserForgetPasswordSuccess(String pwd) {
                super.onUserForgetPasswordSuccess(pwd);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onUserForgetPasswordSuccess(pwd);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onUserForgetPasswordSuccess(pwd);
                }
            }


            @Override
            public void onUserForgetPasswordFail(Exception e) {
                super.onUserForgetPasswordFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onUserForgetPasswordFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onUserForgetPasswordFail(e);
                }
            }
        });
    }

    @Override
    public void userBindEmail(String jsonParam) {
        model.userBindEmail(jsonParam, new ModelCallback() {
            @Override
            public void onUserBindEmailSuccess(String resp) {
                super.onUserBindEmailSuccess(resp);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onUserBindEmailSuccess(resp);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onUserBindEmailSuccess(resp);
                }
            }

            @Override
            public void onUserBindEmailFail(Exception e) {
                super.onUserBindEmailFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onUserBindEmailFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onUserBindEmailFail(e);
                }
            }
        });
    }

    @Override
    public void userGetUser(String jsonParam) {
        model.userGetUser(jsonParam, new ModelCallback() {
            @Override
            public void onUserGetUserSuccess(EntityUser entityUser) {
                super.onUserGetUserSuccess(entityUser);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onUserGetUserSuccess(entityUser);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onUserGetUserSuccess(entityUser);
                }
            }

            @Override
            public void onUserGetUserFail(Exception e) {
                super.onUserGetUserFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onUserGetUserFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onUserGetUserFail(e);
                }
            }
        });
    }

    @Override
    public void userSendEmailVerifyCode(String jsonParam) {
        model.userSendEmailVerifyCode(jsonParam, new ModelCallback() {
            @Override
            public void onUserSendEmailVerifyCodeSuccess(String resp) {
                super.onUserSendEmailVerifyCodeSuccess(resp);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onUserSendEmailVerifyCodeSuccess(resp);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onUserSendEmailVerifyCodeSuccess(resp);
                }
            }

            @Override
            public void onUserSendEmailVerifyCodeFail(Exception e) {
                super.onUserSendEmailVerifyCodeFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onUserSendEmailVerifyCodeFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onUserSendEmailVerifyCodeFail(e);
                }
            }
        });
    }

    @Override
    public void userSetPayPassword(String jsonParam) {
        model.userSetPayPassword(jsonParam, new ModelCallback() {
            @Override
            public void onUserSetPayPasswordSuccess(String resp) {
                super.onUserSetPayPasswordSuccess(resp);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onUserSetPayPasswordSuccess(resp);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onUserSetPayPasswordSuccess(resp);
                }
            }

            @Override
            public void onUserSetPayPasswordFail(Exception e) {
                super.onUserSendEmailVerifyCodeFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onUserSetPayPasswordFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onUserSetPayPasswordFail(e);
                }
            }
        });
    }

    @Override
    public void userUploadImg(String jsonParam) {
        model.userUploadImg(jsonParam, new ModelCallback() {
            @Override
            public void onUserUploadImgSuccess(String resp) {
                super.onUserUploadImgSuccess(resp);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onUserUploadImgSuccess(resp);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onUserUploadImgSuccess(resp);
                }
            }

            @Override
            public void onUserUploadImgFail(Exception e) {
                super.onUserUploadImgFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onUserUploadImgFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onUserUploadImgFail(e);
                }
            }
        });
    }

    @Override
    public void uploadPhoto(String jsonParam) {
        model.uploadPhoto(jsonParam, new ModelCallback() {
            @Override
            public void onUploadPhotoSuccess(String resp) {
                super.onUploadPhotoSuccess(resp);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onUploadPhotoSuccess(resp);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onUploadPhotoSuccess(resp);
                }
            }

            @Override
            public void onUploadPhotoFail(Exception e) {
                super.onUploadPhotoFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onUploadPhotoFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onUploadPhotoFail(e);
                }
            }
        });
    }

    @Override
    public void userUpdateName(String jsonParam) {
        model.userUpdateName(jsonParam, new ModelCallback() {

            @Override
            public void onUserUpdateNameSuccess() {
                super.onUserUpdateNameSuccess();
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onUserUpdateNameSuccess();
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onUserUpdateNameSuccess();
                }
            }

            @Override
            public void onUserUpdateNameFail(Exception e) {
                super.onUserUpdateNameFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onUserUpdateNameFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onUserUpdateNameFail(e);
                }
            }
        });
    }

    @Override
    public void userInvitationCode(String jsonParam) {
        model.userInvitationCode(jsonParam, new ModelCallback() {
            @Override
            public void onUserInvitationCodeSuccess(String invitationCode) {
                super.onUserInvitationCodeSuccess(invitationCode);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onUserInvitationCodeSuccess(invitationCode);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onUserInvitationCodeSuccess(invitationCode);
                }
            }

            @Override
            public void onUserInvitationCodeFail(Exception e) {
                super.onUserInvitationCodeFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onUserInvitationCodeFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onUserInvitationCodeFail(e);
                }
            }
        });
    }

    @Override
    public void userUpdatePhone(String jsonParam) {
        model.userUpdatePhone(jsonParam, new ModelCallback() {
            @Override
            public void onUserUpdatePhoneSuccess(String invitationCode) {
                super.onUserUpdatePhoneSuccess(invitationCode);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onUserUpdatePhoneSuccess(invitationCode);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onUserUpdatePhoneSuccess(invitationCode);
                }
            }

            @Override
            public void onUserUpdatePhoneFail(Exception e) {
                super.onUserUpdatePhoneFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onUserUpdatePhoneFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onUserUpdatePhoneFail(e);
                }
            }
        });
    }

    @Override
    public void getUserCommunity(String jsonParam) {
        model.getUserCommunity(jsonParam, new ModelCallback() {

            @Override
            public void onGetUserCommunitySuccess(EntityMyCommunity myCommunity) {
                super.onGetUserCommunitySuccess(myCommunity);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onGetUserCommunitySuccess(myCommunity);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onGetUserCommunitySuccess(myCommunity);
                }
            }

            @Override
            public void onGetUserCommunityFail(Exception e) {
                super.onGetUserCommunityFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onGetUserCommunityFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onGetUserCommunityFail(e);
                }
            }
        });
    }

    @Override
    public void getNoticeList(String jsonParam) {
        model.getNoticeList(jsonParam, new ModelCallback() {
            @Override
            public void onGetNoticeListSuccess(List<EntityNotice> entityNoticeList) {
                super.onGetNoticeListSuccess(entityNoticeList);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onGetNoticeListSuccess(entityNoticeList);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onGetNoticeListSuccess(entityNoticeList);

                }
            }

            @Override
            public void onGetNoticeListFail(Exception e) {
                super.onGetNoticeListFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onGetNoticeListFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onGetNoticeListFail(e);
                }
            }
        });
    }

    @Override
    public void getNewsList(String jsonParam) {
        model.getNewsList(jsonParam, new ModelCallback() {
            @Override
            public void onGetNewsListSuccess(List<EntityNews> entityNewsList) {
                super.onGetNewsListSuccess(entityNewsList);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onGetNewsListSuccess(entityNewsList);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onGetNewsListSuccess(entityNewsList);

                }
            }

            @Override
            public void onGetNewsListFail(Exception e) {
                super.onGetNewsListFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onGetNewsListFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onGetNewsListFail(e);
                }
            }
        });
    }

    @Override
    public void getNewsDetail(String jsonParam) {
        model.getNewsDetail(jsonParam, new ModelCallback() {
            @Override
            public void onGetNewsDetailSuccess(EntityNews entityNews) {
                super.onGetNewsDetailSuccess(entityNews);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onGetNewsDetailSuccess(entityNews);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onGetNewsDetailSuccess(entityNews);

                }
            }

            @Override
            public void onGetNewsDetailFail(Exception e) {
                super.onGetNewsDetailFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onGetNewsDetailFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onGetNewsDetailFail(e);
                }
            }
        });
    }

    @Override
    public void userFeedback(String jsonParam) {
        model.userFeedback(jsonParam, new ModelCallback() {
            @Override
            public void onUserFeedbackSuccess() {
                super.onUserFeedbackSuccess();
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onUserFeedbackSuccess();
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onUserFeedbackSuccess();

                }
            }

            @Override
            public void onUserFeedbackFail(Exception e) {
                super.onUserFeedbackFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onUserFeedbackFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onUserFeedbackFail(e);
                }
            }
        });
    }

    @Override
    public void getReceiveAddressList(String jsonParam) {
        model.getReceiveAddressList(jsonParam, new ModelCallback() {
            @Override
            public void onGetReceiveAddressListSuccess(List<EntityReceivingAddress> list) {
                super.onGetReceiveAddressListSuccess(list);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onGetReceiveAddressListSuccess(list);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onGetReceiveAddressListSuccess(list);
                }
            }

            @Override
            public void onGetReceiveAddressListFail(Exception e) {
                super.onGetReceiveAddressListFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onGetReceiveAddressListFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onGetReceiveAddressListFail(e);
                }
            }
        });
    }

    @Override
    public void addReceiveAddress(String jsonParam) {
        model.addReceiveAddress(jsonParam, new ModelCallback() {
            @Override
            public void onAddReceivingAddressSuccess() {
                super.onAddReceivingAddressSuccess();
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onAddReceivingAddressSuccess();
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onAddReceivingAddressSuccess();
                }
            }

            @Override
            public void onAddReceivingAddressFail(Exception e) {
                super.onAddReceivingAddressFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onAddReceivingAddressFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onAddReceivingAddressFail(e);
                }
            }
        });
    }

    @Override
    public void deleteReceiveAddress(String jsonParam) {
        model.deleteReceiveAddress(jsonParam, new ModelCallback() {
            @Override
            public void onDeleteReceivingAddressSuccess() {
                super.onDeleteReceivingAddressSuccess();
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onDeleteReceivingAddressSuccess();
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onDeleteReceivingAddressSuccess();
                }
            }

            @Override
            public void onDeleteReceivingAddressFail(Exception e) {
                super.onDeleteReceivingAddressFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onDeleteReceivingAddressFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onDeleteReceivingAddressFail(e);
                }
            }
        });
    }

    @Override
    public void updateReceiveAddress(String jsonParam) {
        model.updateReceiveAddress(jsonParam, new ModelCallback() {

            @Override
            public void onModifyReceivingAddressSuccess() {
                super.onModifyReceivingAddressSuccess();
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onModifyReceivingAddressSuccess();
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onModifyReceivingAddressSuccess();
                }
            }

            @Override
            public void onModifyReceivingAddressFail(Exception e) {
                super.onModifyReceivingAddressFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onModifyReceivingAddressFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onModifyReceivingAddressFail(e);
                }
            }
        });
    }

    @Override
    public void xxxxxxxxxxxxxx账户相关结束xxxxxxxxxxxxx() {

    }

    @Override
    public void xxxxxxxxxxxxxx资产相关开始xxxxxxxxxxxxx() {

    }

    @Override
    public void getUserBurseCoinNumberList(String jsonParam) {
        model.getUserBurseCoinNumberList(jsonParam, new ModelCallback() {
            @Override
            public void onGetUserBurseCoinNumberListSuccess(EntityBurseCoinNumber entityBurseCoinNumber) {
                super.onGetUserBurseCoinNumberListSuccess(entityBurseCoinNumber);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onGetUserBurseCoinNumberListSuccess(entityBurseCoinNumber);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onGetUserBurseCoinNumberListSuccess(entityBurseCoinNumber);
                }
            }

            @Override
            public void onGetUserBurseCoinNumberListFail(Exception e) {
                super.onGetUserBurseCoinNumberListFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onGetUserBurseCoinNumberListFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onGetUserBurseCoinNumberListFail(e);
                }
            }
        });
    }

    @Override
    public void getServiceChargePercent(String jsonParam) {
        model.getServiceChargePercent(jsonParam, new ModelCallback() {

            @Override
            public void onGetServiceChargePercentSuccess(double percent) {
                super.onGetServiceChargePercentSuccess(percent);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onGetServiceChargePercentSuccess(percent);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onGetServiceChargePercentSuccess(percent);
                }
            }

            @Override
            public void onGetServiceChargePercentFail(Exception e) {
                super.onGetServiceChargePercentFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onGetServiceChargePercentFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onGetServiceChargePercentFail(e);
                }
            }
        });
    }

    @Override
    public void transferAccounts(String jsonParam) {
        model.transferAccounts(jsonParam, new ModelCallback() {
            @Override
            public void onTransferAccountsSuccess() {
                super.onTransferAccountsSuccess();
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onTransferAccountsSuccess();
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onTransferAccountsSuccess();
                }
            }

            @Override
            public void onTransferAccountsFail(Exception e) {
                super.onTransferAccountsFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onTransferAccountsFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onTransferAccountsFail(e);
                }
            }
        });
    }

    @Override
    public void getUserBurseList(String jsonParam) {
        model.getUserBurseList(jsonParam, new ModelCallback() {
            @Override
            public void onGetUserBurseListSuccess(List<EntityBurseRecord> entityBurseRecordList) {
                super.onGetUserBurseListSuccess(entityBurseRecordList);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onGetUserBurseListSuccess(entityBurseRecordList);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onGetUserBurseListSuccess(entityBurseRecordList);

                }
            }

            @Override
            public void onGetUserBurseListFail(Exception e) {
                super.onGetUserBurseListFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onGetUserBurseListFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onGetUserBurseListFail(e);
                }
            }
        });
    }

    @Override
    public void getUserBurseDetail(String jsonParam) {
        model.getUserBurseDetail(jsonParam, new ModelCallback() {
            @Override
            public void onGetUserBurseDetailSuccess(EntityBurseRecordDetail entityBurseRecordDetail) {
                super.onGetUserBurseDetailSuccess(entityBurseRecordDetail);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onGetUserBurseDetailSuccess(entityBurseRecordDetail);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onGetUserBurseDetailSuccess(entityBurseRecordDetail);

                }
            }

            @Override
            public void onGetUserBurseDetailFail(Exception e) {
                super.onGetUserBurseDetailFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onGetUserBurseDetailFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onGetUserBurseDetailFail(e);
                }
            }
        });

    }

    @Override
    public void addPartnerApply(String jsonParam) {
        model.addPartnerApply(jsonParam, new ModelCallback() {
            @Override
            public void onAddPartnerApplySuccess(EntityPartnerApply entityPartnerApply) {
                super.onAddPartnerApplySuccess(entityPartnerApply);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onAddPartnerApplySuccess(entityPartnerApply);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onAddPartnerApplySuccess(entityPartnerApply);
                }
            }

            @Override
            public void onAddPartnerApplyFail(Exception e) {
                super.onAddPartnerApplyFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onAddPartnerApplyFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onAddPartnerApplyFail(e);
                }
            }
        });

    }

    @Override
    public void assetGTEOverview(String jsonParam) {
        model.assetGTEOverview(jsonParam, new ModelCallback() {
            @Override
            public void onAssetGTEOverviewSuccess(EntityAssetGTEOverview entityAssetGTEOverview) {
                super.onAssetGTEOverviewSuccess(entityAssetGTEOverview);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onAssetGTEOverviewSuccess(entityAssetGTEOverview);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onAssetGTEOverviewSuccess(entityAssetGTEOverview);
                }
            }

            @Override
            public void onAssetGTEOverviewFail(Exception e) {
                super.onAssetGTEOverviewFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onAssetGTEOverviewFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onAssetGTEOverviewFail(e);
                }
            }
        });
    }

    @Override
    public void assetGTEDetail(String jsonParam) {
        model.assetGTEDetail(jsonParam, new ModelCallback() {
            @Override
            public void onAssetGTEDetailSuccess(EntityAssetGTEDetail entityAssetGTEDetail) {
                super.onAssetGTEDetailSuccess(entityAssetGTEDetail);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onAssetGTEDetailSuccess(entityAssetGTEDetail);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onAssetGTEDetailSuccess(entityAssetGTEDetail);
                }
            }

            @Override
            public void onAssetGTEDetailFail(Exception e) {
                super.onAssetGTEDetailFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onAssetGTEDetailFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onAssetGTEDetailFail(e);
                }
            }
        });
    }

    @Override
    public void assetGTKOverview(String jsonParam) {
        model.assetGTKOverview(jsonParam, new ModelCallback() {
            @Override
            public void onAssetGTKOverviewSuccess(EntityAssetGTKOverview entityAssetGTKOverview) {
                super.onAssetGTKOverviewSuccess(entityAssetGTKOverview);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onAssetGTKOverviewSuccess(entityAssetGTKOverview);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onAssetGTKOverviewSuccess(entityAssetGTKOverview);
                }
            }

            @Override
            public void onAssetGTKOverviewFail(Exception e) {
                super.onAssetGTKOverviewFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onAssetGTKOverviewFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onAssetGTKOverviewFail(e);
                }
            }
        });
    }

    @Override
    public void assetGTKDetail(String jsonParam) {
        model.assetGTKDetail(jsonParam, new ModelCallback() {
            @Override
            public void onAssetGTKDetailSuccess(EntityAssetGTKDetail entityAssetGTKDetail) {
                super.onAssetGTKDetailSuccess(entityAssetGTKDetail);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onAssetGTKDetailSuccess(entityAssetGTKDetail);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onAssetGTKDetailSuccess(entityAssetGTKDetail);
                }
            }

            @Override
            public void onAssetGTKDetailFail(Exception e) {
                super.onAssetGTKDetailFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onAssetGTKDetailFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onAssetGTKDetailFail(e);
                }
            }
        });
    }

    @Override
    public void assetDetailRecord(String jsonParam) {
        model.assetDetailRecord(jsonParam, new ModelCallback() {
            @Override
            public void onAssetDetailRecordSuccess(List<EntityAssetDetailRecord> entityAssetDetailRecordList) {
                super.onAssetDetailRecordSuccess(entityAssetDetailRecordList);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onAssetDetailRecordSuccess(entityAssetDetailRecordList);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onAssetDetailRecordSuccess(entityAssetDetailRecordList);
                }
            }

            @Override
            public void onAssetDetailRecordFail(Exception e) {
                super.onAssetDetailRecordFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onAssetDetailRecordFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onAssetDetailRecordFail(e);
                }
            }
        });
    }

    @Override
    public void otherAsset(String jsonParam) {
        model.otherAsset(jsonParam, new ModelCallback() {
            @Override
            public void onOtherAssetSuccess(String type,EntityOtherAssets entityOtherAssets) {
                super.onOtherAssetSuccess(type,entityOtherAssets);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onOtherAssetSuccess(type,entityOtherAssets);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onOtherAssetSuccess(type,entityOtherAssets);
                }
            }

            @Override
            public void onOtherAssetFail(Exception e) {
                super.onOtherAssetFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onOtherAssetFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onOtherAssetFail(e);
                }
            }
        });
    }

    @Override
    public void xxxxxxxxxxxxxx资产相关结束xxxxxxxxxxxxx() {

    }

    @Override
    public void xxxxxxxxxxxxxx社区相关开始xxxxxxxxxxxxx() {

    }

    @Override
    public void communityLevelList(String jsonParam) {
        model.communityLevelList(jsonParam, new ModelCallback() {
            @Override
            public void onCommunityLevelListSuccess(List<EntityCommunityLevelMember> entityCommunityLevelMemberList) {
                super.onCommunityLevelListSuccess(entityCommunityLevelMemberList);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onCommunityLevelListSuccess(entityCommunityLevelMemberList);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onCommunityLevelListSuccess(entityCommunityLevelMemberList);
                }
            }

            @Override
            public void onCommunityLevelListFail(Exception e) {
                super.onCommunityLevelListFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onCommunityLevelListFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onCommunityLevelListFail(e);
                }
            }
        });
    }

    @Override
    public void communityOverview(String jsonParam) {
        model.communityOverview(jsonParam, new ModelCallback() {
            @Override
            public void onCommunityOverviewSuccess(EntityCommunity resp) {
                super.onCommunityOverviewSuccess(resp);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onCommunityOverviewSuccess(resp);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onCommunityOverviewSuccess(resp);
                }
            }

            @Override
            public void onCommunityOverviewFail(Exception e) {
                super.onCommunityOverviewFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onCommunityOverviewFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onCommunityOverviewFail(e);
                }
            }
        });
    }

    @Override
    public void xxxxxxxxxxxxxx社区相关结束xxxxxxxxxxxxx() {

    }

    @Override
    public void xxxxxxxxxxxxxx币种转化相关开始xxxxxxxxxxxxx() {

    }

    @Override
    public void transferRecharge(String jsonParam) {
        model.transferRecharge(jsonParam, new ModelCallback() {
            @Override
            public void onTransferRechargeSuccess(String resp) {
                super.onTransferRechargeSuccess(resp);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onTransferRechargeSuccess(resp);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onTransferRechargeSuccess(resp);
                }
            }

            @Override
            public void onTransferRechargeFail(Exception e) {
                super.onTransferRechargeFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onTransferRechargeFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onTransferRechargeFail(e);
                }
            }
        });
    }

    @Override
    public void transferTransfer(String jsonParam) {
        model.transferTransfer(jsonParam, new ModelCallback() {
            @Override
            public void onTransferTransferSuccess(String resp) {
                super.onTransferTransferSuccess(resp);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onTransferTransferSuccess(resp);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onTransferTransferSuccess(resp);
                }
            }

            @Override
            public void onTransferTransferFail(Exception e) {
                super.onTransferTransferFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onTransferTransferFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onTransferTransferFail(e);
                }
            }
        });
    }

    @Override
    public void transferOpenTransfer(String jsonParam) {
        model.transferOpenTransfer(jsonParam, new ModelCallback() {
            @Override
            public void onTransferOpenTransferSuccess(String resp) {
                super.onTransferOpenTransferSuccess(resp);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onTransferOpenTransferSuccess(resp);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onTransferOpenTransferSuccess(resp);
                }
            }

            @Override
            public void onTransferOpenTransferFail(Exception e) {
                super.onTransferOpenTransferFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onTransferOpenTransferFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onTransferOpenTransferFail(e);
                }
            }
        });
    }

    @Override
    public void xxxxxxxxxxxxxx币种转化相关结束xxxxxxxxxxxxx() {

    }

    @Override
    public void xxxxxxxxxxxxxx支付相关开始xxxxxxxxxxxxx() {

    }

    @Override
    public void paymentPay(String jsonParam) {
        model.paymentPay(jsonParam, new ModelCallback() {
            @Override
            public void onPaymentPaySuccess(String resp) {
                super.onPaymentPaySuccess(resp);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onPaymentPaySuccess(resp);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onPaymentPaySuccess(resp);
                }
            }

            @Override
            public void onPaymentPayFail(Exception e) {
                super.onPaymentPayFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onPaymentPayFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onPaymentPayFail(e);
                }
            }
        });
    }

    @Override
    public void xxxxxxxxxxxxxx支付相关结束xxxxxxxxxxxxx() {

    }

    @Override
    public void xxxxxxxxxxxxxx交易相关开始xxxxxxxxxxxxx() {

    }

    @Override
    public void queryBBValue(int bbType) {
        model.queryBBValue(bbType, new ModelCallback() {

            @Override
            public void onQueryBBValueSuccess(int bbType, String value) {
                super.onQueryBBValueSuccess(bbType, value);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onQueryBBValueSuccess(bbType, value);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onQueryBBValueSuccess(bbType, value);

                }
            }

            @Override
            public void onQueryBBValueFail(Exception e) {
                super.onQueryBBValueFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onQueryBBValueFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onQueryBBValueFail(e);
                }
            }
        });
    }

    @Override
    public void transOverview(String jsonParam) {
        model.transOverview(jsonParam, new ModelCallback() {
            @Override
            public void onTransOverviewSuccess(String resp) {
                super.onTransOverviewSuccess(resp);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onTransOverviewSuccess(resp);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onTransOverviewSuccess(resp);
                }
            }

            @Override
            public void onTransOverviewFail(Exception e) {
                super.onTransOverviewFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onTransOverviewFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onTransOverviewFail(e);
                }
            }
        });
    }

    @Override
    public void queryTradePriceData(String jsonParam) {
        model.queryTradePriceData(jsonParam, new ModelCallback() {
            @Override
            public void onQueryTradePriceDataSuccess(EntityTradePriceData entityTradePriceData) {
                super.onQueryTradePriceDataSuccess(entityTradePriceData);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onQueryTradePriceDataSuccess(entityTradePriceData);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onQueryTradePriceDataSuccess(entityTradePriceData);

                }
            }

            @Override
            public void onQueryTradePriceDataFail(Exception e) {
                super.onQueryTradePriceDataFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onQueryTradePriceDataFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onQueryTradePriceDataFail(e);
                }
            }
        });
    }

    @Override
    public void queryTransactionOrderList(String jsonParam) {
        model.queryTransactionOrderList(jsonParam, new ModelCallback() {


            @Override
            public void queryTransactionOrderListSuccess(List<EntityOrderWithTrade> list) {
                super.queryTransactionOrderListSuccess(list);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.queryTransactionOrderListSuccess(list);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.queryTransactionOrderListSuccess(list);


                }
            }

            @Override
            public void queryTransactionOrderListFail(Exception e) {
                super.queryTransactionOrderListFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.queryTransactionOrderListFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.queryTransactionOrderListFail(e);
                }
            }
        });
    }

    @Override
    public void cancelUntradeOrder(String jsonParam) {
        model.cancelUntradeOrder(jsonParam, new ModelCallback() {
            @Override
            public void onCancelUnTradeTransactionOrderSuccess() {
                super.onCancelUnTradeTransactionOrderSuccess();
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onCancelUnTradeTransactionOrderSuccess();
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onCancelUnTradeTransactionOrderSuccess();


                }
            }

            @Override
            public void onCancelUnTradeTransactionOrderFail(Exception e) {
                super.onCancelUnTradeTransactionOrderFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onCancelUnTradeTransactionOrderFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onCancelUnTradeTransactionOrderFail(e);
                }
            }
        });
    }

    @Override
    public void gteBuyOrSell(String jsonParam) {
        model.gteBuyOrSell(jsonParam, new ModelCallback() {

            @Override
            public void gteBuyOrSellSuccess(String data) {
                super.gteBuyOrSellSuccess(data);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.gteBuyOrSellSuccess(data);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.gteBuyOrSellSuccess(data);


                }
            }

            @Override
            public void gteBuyOrSellFail(Exception e) {
                super.gteBuyOrSellFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.gteBuyOrSellFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.gteBuyOrSellFail(e);
                }
            }
        });
    }

    @Override
    public void queryTradeBuyAndSellDetail(String jsonParam) {
        model.queryTradeBuyAndSellDetail(jsonParam, new ModelCallback() {

            @Override
            public void onQueryTradeBuyAndSellDetailSuccess(EntityTradeOrderDeatil orderDeatil) {
                super.onQueryTradeBuyAndSellDetailSuccess(orderDeatil);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onQueryTradeBuyAndSellDetailSuccess(orderDeatil);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onQueryTradeBuyAndSellDetailSuccess(orderDeatil);

                }
            }

            @Override
            public void onQueryTradeBuyAndSellDetailFail(Exception e) {
                super.onQueryTradeBuyAndSellDetailFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onQueryTradeBuyAndSellDetailFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onQueryTradeBuyAndSellDetailFail(e);
                }
            }
        });
    }

    @Override
    public void queryOrderDetail(String jsonParam) {
        model.queryOrderDetail(jsonParam, new ModelCallback() {


            @Override
            public void onqueryOrderDetailSuccess(EntityOrderDetail orderDetail) {
                super.onqueryOrderDetailSuccess(orderDetail);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onqueryOrderDetailSuccess(orderDetail);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onqueryOrderDetailSuccess(orderDetail);


                }
            }

            @Override
            public void onqueryOrderDetailFail(Exception e) {
                super.onqueryOrderDetailFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onqueryOrderDetailFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onqueryOrderDetailFail(e);
                }
            }
        });
    }

    @Override
    public void confirmPayGte(String jsonParam) {
        model.confirmPayGte(jsonParam, new ModelCallback() {
            @Override
            public void onConfirmPayGteSuccess() {
                super.onConfirmPayGteSuccess();
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onConfirmPayGteSuccess();
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onConfirmPayGteSuccess();
                }
            }

            @Override
            public void onConfirmPayGteFail(Exception e) {
                super.onConfirmPayGteFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onConfirmPayGteFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onConfirmPayGteFail(e);
                }
            }
        });
    }

    @Override
    public void payMoney(String jsonParam) {
        model.payMoney(jsonParam, new ModelCallback() {

            @Override
            public void onPayMoneySuccess() {
                super.onPayMoneySuccess();
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onPayMoneySuccess();
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onPayMoneySuccess();

                }
            }

            @Override
            public void onPayMoneyFail(Exception e) {
                super.onPayMoneyFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onPayMoneyFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onPayMoneyFail(e);
                }
            }
        });
    }

    @Override
    public void userBuyTrade(String jsonParam) {
        model.userBuyTrade(jsonParam, new ModelCallback() {

            @Override
            public void onUserBuyTradeSuccess() {
                super.onUserBuyTradeSuccess();
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onUserBuyTradeSuccess();
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onUserBuyTradeSuccess();

                }
            }

            @Override
            public void onUserBuyTradeFail(Exception e) {
                super.onUserBuyTradeFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onUserBuyTradeFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onUserBuyTradeFail(e);
                }
            }
        });
    }

    @Override
    public void xxxxxxxxxxxxxx交易相关结束xxxxxxxxxxxxx() {

    }

    @Override
    public void xxxxxxxxxxxxxx验证相关开始xxxxxxxxxxxxx() {

    }

    @Override
    public void verifyGeneralAuth(String jsonParam) {
        model.verifyGeneralAuth(jsonParam, new ModelCallback() {
            @Override
            public void onVerifyGeneralAuthSuccess(String resp) {
                super.onVerifyGeneralAuthSuccess(resp);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onVerifyGeneralAuthSuccess(resp);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onVerifyGeneralAuthSuccess(resp);
                }
            }

            @Override
            public void onVerifyGeneralAuthFail(Exception e) {
                super.onVerifyGeneralAuthFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onVerifyGeneralAuthFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onVerifyGeneralAuthFail(e);
                }
            }
        });
    }

    @Override
    public void verifySafeAuth(String jsonParam) {
        model.verifySafeAuth(jsonParam, new ModelCallback() {
            @Override
            public void onVerifySafeAuthSuccess(String resp) {
                super.onVerifySafeAuthSuccess(resp);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onVerifySafeAuthSuccess(resp);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onVerifySafeAuthSuccess(resp);
                }
            }

            @Override
            public void onVerifySafeAuthFail(Exception e) {
                super.onVerifySafeAuthFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onVerifySafeAuthFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onVerifySafeAuthFail(e);
                }
            }
        });
    }

    @Override
    public void isGeneralAuth(String jsonparam) {
        model.isGeneralAuth(jsonparam, new ModelCallback() {
            @Override
            public void onGetIsGeneralAuthSuccess(EntityGeneralAuth entityGeneralAuth) {
                super.onGetIsGeneralAuthSuccess(entityGeneralAuth);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onGetIsGeneralAuthSuccess(entityGeneralAuth);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onGetIsGeneralAuthSuccess(entityGeneralAuth);
                }
            }

            @Override
            public void onGetIsGeneralAuthFail(Exception e) {
                super.onGetIsGeneralAuthFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onGetIsGeneralAuthFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onGetIsGeneralAuthFail(e);
                }
            }
        });
    }

    @Override
    public void xxxxxxxxxxxxxx验证相关结束xxxxxxxxxxxxx() {

    }

    @Override
    public void xxxxxxxxxxxxxx行权相关开始xxxxxxxxxxxxx() {

    }

    @Override
    public void addExerciseOrder(String jsonParam) {
        model.addExerciseOrder(jsonParam, new ModelCallback() {
            @Override
            public void onAddExerciseOrderSuccess(String resp) {
                super.onAddExerciseOrderSuccess(resp);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onAddExerciseOrderSuccess(resp);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onAddExerciseOrderSuccess(resp);
                }
            }

            @Override
            public void onAddExerciseOrderFail(Exception e) {
                super.onAddExerciseOrderFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onAddExerciseOrderFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onAddExerciseOrderFail(e);
                }
            }
        });
    }


    @Override
    public void getExerciseOrderList(String jsonParam) {
        model.getExerciseOrderList(jsonParam, new ModelCallback() {
            @Override
            public void onGetExerciseOrderListSuccess(List<EntityExercise> entityExerciseList) {
                super.onGetExerciseOrderListSuccess(entityExerciseList);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onGetExerciseOrderListSuccess(entityExerciseList);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onGetExerciseOrderListSuccess(entityExerciseList);
                }
            }

            @Override
            public void onGetExerciseOrderListFail(Exception e) {
                super.onGetExerciseOrderListFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onGetExerciseOrderListFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onGetExerciseOrderListFail(e);
                }
            }
        });
    }

    @Override
    public void getExerciseOrder(String jsonParam) {
        model.getExerciseOrder(jsonParam, new ModelCallback() {
            @Override
            public void onGetExerciseOrderSuccess(EntityExercise entityExercise) {
                super.onGetExerciseOrderSuccess(entityExercise);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onGetExerciseOrderSuccess(entityExercise);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onGetExerciseOrderSuccess(entityExercise);
                }
            }

            @Override
            public void onGetExerciseOrderFail(Exception e) {
                super.onGetExerciseOrderFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onGetExerciseOrderFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onGetExerciseOrderFail(e);
                }
            }
        });
    }

    @Override
    public void xxxxxxxxxxxxxx行权相关结束xxxxxxxxxxxxx() {

    }

    @Override
    public void xxxxxxxxxxxxxx首页相关开始xxxxxxxxxxxxxx() {

    }

    @Override
    public void getAssetsList(String jsonParam) {
        model.getAssetsList(jsonParam, new ModelCallback() {
            @Override
            public void onGetAssetsListSuccess(List<EntityAssetsBag> assetsBagList) {
                super.onGetAssetsListSuccess(assetsBagList);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onGetAssetsListSuccess(assetsBagList);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onGetAssetsListSuccess(assetsBagList);
                }
            }

            @Override
            public void onGetAssetsListFail(Exception e) {
                super.onGetAssetsListFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onGetAssetsListFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onGetAssetsListFail(e);
                }
            }
        });
    }

    @Override
    public void getAssetsDetailById(String jsonParam) {
        model.getAssetsDetailById(jsonParam, new ModelCallback() {
            @Override
            public void onGetAssetsDetailSuccess(EntityAssetsBag entityAssetsBag) {
                super.onGetAssetsDetailSuccess(entityAssetsBag);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onGetAssetsDetailSuccess(entityAssetsBag);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onGetAssetsDetailSuccess(entityAssetsBag);
                }
            }

            @Override
            public void onGetAssetsDetailFail(Exception e) {
                super.onGetAssetsDetailFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onGetAssetsDetailFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onGetAssetsDetailFail(e);
                }
            }
        });
    }

    @Override
    public void BuyAssets(String jsonParam) {
        model.BuyAssets(jsonParam, new ModelCallback() {
            @Override
            public void onBuyAssetsSuccess() {
                super.onBuyAssetsSuccess();
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onBuyAssetsSuccess();
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onBuyAssetsSuccess();
                }
            }

            @Override
            public void onBuyAssetsFail(Exception e) {
                super.onBuyAssetsFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onBuyAssetsFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onBuyAssetsFail(e);
                }
            }
        });
    }


    @Override
    public void xxxxxxxxxxxxxx首页相关结束xxxxxxxxxxxxx() {

    }

    @Override
    public void xxxxxxxxxxxxxx算码相关开始xxxxxxxxxxxxxx() {

    }

    @Override
    public void openBuyMiner(String jsonParam) {
        model.openBuyMiner(jsonParam, new ModelCallback() {
            @Override
            public void onOpenBuyMinerSuccess(String price, String buyMinerProportion) {
                super.onOpenBuyMinerSuccess(price, buyMinerProportion);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onOpenBuyMinerSuccess(price, buyMinerProportion);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onOpenBuyMinerSuccess(price, buyMinerProportion);

                }
            }

            @Override
            public void onOpenBuyMinerFail(Exception e) {
                super.onOpenBuyMinerFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onOpenBuyMinerFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onOpenBuyMinerFail(e);
                }
            }
        });
    }

    @Override
    public void buyMiner(String jsonParam) {
        model.buyMiner(jsonParam, new ModelCallback() {

            @Override
            public void onBuyMinerSuccess() {
                super.onBuyMinerSuccess();
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onBuyMinerSuccess();
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onBuyMinerSuccess();
                }
            }

            @Override
            public void onBuyMinerFail(Exception e) {
                super.onBuyMinerFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onBuyMinerFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onBuyMinerFail(e);
                }
            }
        });
    }

    @Override
    public void queryMinerProfitList(String jsonParam) {
        model.queryMinerProfitList(jsonParam, new ModelCallback() {

            @Override
            public void onQueryMinerProfitListSuccess(List<EntityComputeCodeEarningRecord> list) {
                super.onQueryMinerProfitListSuccess(list);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onQueryMinerProfitListSuccess(list);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onQueryMinerProfitListSuccess(list);
                }
            }

            @Override
            public void onQueryMinerProfitListFail(Exception e) {
                super.onQueryMinerProfitListFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onQueryMinerProfitListFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onQueryMinerProfitListFail(e);
                }
            }
        });
    }

    @Override
    public void queryUserMinerList(String jsonParam) {
        model.queryUserMinerList(jsonParam, new ModelCallback() {
            @Override
            public void onQueryUserMinerListSuccess(EntityMyComputeCode entityMyComputeCode) {
                super.onQueryUserMinerListSuccess(entityMyComputeCode);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onQueryUserMinerListSuccess(entityMyComputeCode);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onQueryUserMinerListSuccess(entityMyComputeCode);
                }
            }

            @Override
            public void onQueryUserMinerListFail(Exception e) {
                super.onQueryUserMinerListFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onQueryUserMinerListFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onQueryUserMinerListFail(e);
                }
            }
        });
    }

    @Override
    public void minerPayDeposit(String jsonParam) {
        model.minerPayDeposit(jsonParam, new ModelCallback() {
            @Override
            public void onMinerPayDepositSuccess(String resp) {
                super.onMinerPayDepositSuccess(resp);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onMinerPayDepositSuccess(resp);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onMinerPayDepositSuccess(resp);
                }
            }

            @Override
            public void onMinerPayDepositFail(Exception e) {
                super.onMinerPayDepositFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onMinerPayDepositFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onMinerPayDepositFail(e);
                }
            }
        });
    }

    @Override
    public void minerReturnDeposit(String jsonParam) {
        model.minerReturnDeposit(jsonParam, new ModelCallback() {
            @Override
            public void onMinerReturnDepositSuccess(String resp) {
                super.onMinerReturnDepositSuccess(resp);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onMinerReturnDepositSuccess(resp);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onMinerReturnDepositSuccess(resp);
                }
            }

            @Override
            public void onMinerReturnDepositFail(Exception e) {
                super.onMinerReturnDepositFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onMinerReturnDepositFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onMinerReturnDepositFail(e);
                }
            }
        });

    }

    @Override
    public void xxxxxxxxxxxxxx算码相关结束xxxxxxxxxxxxx() {

    }

    @Override
    public void xxxxxxxxxxxxxx订单相关开始xxxxxxxxxxxxxx() {

    }

    @Override
    public void orderApply(String jsonParam) {
        model.orderApply(jsonParam, new ModelCallback() {
            @Override
            public void onOrderApplySuccess() {
                super.onOrderApplySuccess();
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onOrderApplySuccess();
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onOrderApplySuccess();
                }
            }

            @Override
            public void onOrderApplyFail(Exception e) {
                super.onOrderApplyFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onOrderApplyFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onOrderApplyFail(e);
                }
            }
        });
    }

    @Override
    public void getOrderDetails(String jsonParam) {
        model.getOrderDetails(jsonParam, new ModelCallback() {

            @Override
            public void onGetOrderDetailsSuccess() {
                super.onGetOrderDetailsSuccess();
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onGetOrderDetailsSuccess();
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onGetOrderDetailsSuccess();
                }
            }

            @Override
            public void onGetOrderDetailsFail(Exception e) {
                super.onGetOrderDetailsFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onGetOrderDetailsFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onGetOrderDetailsFail(e);
                }
            }
        });
    }

    @Override
    public void getOrderBuyAndSaleList(String jsonParam) {
        model.getOrderBuyAndSaleList(jsonParam, new ModelCallback() {
            @Override
            public void onGetOrderBuyAndSellListSuccess(List<EntityOrder> orderList) {
                super.onGetOrderBuyAndSellListSuccess(orderList);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onGetOrderBuyAndSellListSuccess(orderList);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onGetOrderBuyAndSellListSuccess(orderList);
                }
            }

            @Override
            public void onGetOrderBuyAndSellListFail(Exception e) {
                super.onGetOrderBuyAndSellListFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onGetOrderBuyAndSellListFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onGetOrderBuyAndSellListFail(e);
                }
            }
        });

    }

    @Override
    public void getOrderWithTradeList(String jsonParam) {
        model.getOrderWithTradeList(jsonParam, new ModelCallback() {
            @Override
            public void onGetOrderWithTradeListSuccess(List<EntityOrderWithTrade> orderWithTradeList) {
                super.onGetOrderWithTradeListSuccess(orderWithTradeList);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onGetOrderWithTradeListSuccess(orderWithTradeList);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onGetOrderWithTradeListSuccess(orderWithTradeList);

                }
            }

            @Override
            public void onGetOrderWithTradeListFail(Exception e) {
                super.onGetOrderWithTradeListFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onGetOrderWithTradeListFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onGetOrderWithTradeListFail(e);
                }
            }
        });

    }


    @Override
    public void updateOrderStatus(String jsonParam) {
        model.updateOrderStatus(jsonParam, new ModelCallback() {

            @Override
            public void onUpdateOrderStatusSuccess() {
                super.onUpdateOrderStatusSuccess();
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onUpdateOrderStatusSuccess();
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onUpdateOrderStatusSuccess();
                }
            }

            @Override
            public void onUpdateOrderStatusFail(Exception e) {
                super.onUpdateOrderStatusFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onUpdateOrderStatusFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onUpdateOrderStatusFail(e);
                }
            }
        });
    }

    @Override
    public void uploadVoucher(String jsonParam) {
        model.uploadVoucher(jsonParam, new ModelCallback() {
            @Override
            public void onUploadVoucherSuccess() {
                super.onUploadVoucherSuccess();
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onUploadVoucherSuccess();
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onUploadVoucherSuccess();
                }
            }

            @Override
            public void onUploadVoucherFail(Exception e) {
                super.onUploadVoucherFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onUploadVoucherFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onUploadVoucherFail(e);
                }
            }
        });
    }

    @Override
    public void cancelTradingOrder(String jsonParam) {
        model.cancelTradingOrder(jsonParam, new ModelCallback() {


            @Override
            public void onCancelBuyAndSellOrderSuccess() {
                super.onCancelBuyAndSellOrderSuccess();
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onCancelTradingOrderSuccess();
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onCancelTradingOrderSuccess();
                }
            }

            @Override
            public void onCancelTradingOrderFail(Exception e) {
                super.onCancelTradingOrderFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onCancelTradingOrderFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onCancelTradingOrderFail(e);
                }
            }
        });
    }

    @Override
    public void orderRevoke(String jsonParam) {
        model.orderRevoke(jsonParam, new ModelCallback() {

            @Override
            public void onOrderRevokeSuccess() {
                super.onOrderRevokeSuccess();
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onOrderRevokeSuccess();
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onOrderRevokeSuccess();
                }
            }

            @Override
            public void onOrderRevokeFail(Exception e) {
                super.onOrderRevokeFail(e);
                if (view != null && view instanceof Activity && !((Activity) view).isFinishing()) {
                    view.onOrderRevokeFail(e);
                } else if (view != null && view instanceof Fragment && !((Fragment) view).getActivity().isFinishing()) {
                    view.onOrderRevokeFail(e);
                }
            }
        });
    }

    @Override
    public void xxxxxxxxxxxxxx订单相关结束xxxxxxxxxxxxx() {

    }
}
